#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <math.h>

int main() {
    int x1, x2, y1, y2;
    scanf("%d %d", &x1, &y1);
    scanf("%d %d", &x2, &y2);
    x1 = x1 - x2;
    y1 = y1 - y2;
    printf("%d", x1 * x1 + y1 * y1);
    return 0;
}